/*
 * main.cpp
 *
 *  Created on: 2011-03-20
 *      Author: kamil
 *
 *	Main file of the automatic referee project
 */

#include <log4cxx/propertyconfigurator.h>
#include <log4cxx/basicconfigurator.h>
#include <log4cxx/logger.h>

#include "AutoReferee.h"
#include "CmdLineParser.h"

#include "mgr/config/Config.h"

log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger("main"));

int main(int argc, char *argv[]){

	srand(time(0));

	//log4cxx init
	log4cxx::PropertyConfigurator::configure("../config/log4cxx.properties");

	CmdLineParser cmdParser;
	cmdParser.parse(argc, argv);

	Config::instance().parse(cmdParser.getConfigFilePath());

	boost::asio::io_service io_service;
	AutoReferee referee(io_service, cmdParser);
	referee.run();
	return 0;
}
